import BaseUrl from '../BaseUrl'
import RequestHelper from '../../utils/request-helpr'

const systemPath = BaseUrl.getDefaultBaseUrl()
const modulePath = systemPath + '/mrm-admin/playlist'
// 定义Request工具类实例
const requestHelper = new RequestHelper(modulePath)

export const apiPlaylist = {
  get: requestHelper.get,
  post: requestHelper.post,
  file: requestHelper.file,
  /**
 * 分发
*/
  // 创建播单
  create: requestHelper.post('/base/create'),
  // 获取播单列表 分页
  list: requestHelper.get('/base/list'),
  // 读取剪辑任务详情
  read: requestHelper.get('/task/read'),
  update: requestHelper.post('/task/update'),
  status: requestHelper.post('/task/status'),
  delete: requestHelper.post('/task/delete'),
  createByCbct: requestHelper.post('/task/createByCbct'),
  /**
   * 剪辑配置
  */
  getclipcof: requestHelper.post('/setting/read_by_key_list'),
  setclipcof: requestHelper.post('/setting/update_by_key_list'),

  /**
   * 剪辑素材
  */
  // 剪辑任务下的所有素材
  cliplist_all: requestHelper.get('/sub/list_all'),
  // 剪辑任务下的素材，带分页，条件
  cliplist: requestHelper.get('/sub/list'),
  // 只创建不剪辑
  onlycreate: requestHelper.post('/sub/create'),
  // 创建并剪辑
  createAndClip: requestHelper.post('/sub/createAndClip'),
  // 删除剪辑
  delClip: requestHelper.post('/sub/delete'),
  // 一键入库
  allIn: requestHelper.post('/sub/instock_all'),
  // 更新剪辑素材
  updateClip: requestHelper.post('/sub/update'),

  /**
   * 剪辑模板
  */
  // 创建模板
  createTempl: requestHelper.post('/templ/create'),
  // 删除模板
  delTempl: requestHelper.post('/templ/delete'),
  // 获取所有模板
  templOptions: requestHelper.get('/templ/options'),
  // 更新模板
  updateTempl: requestHelper.post('/templ/update')

}

